# EN Documentation for LLMs Generated: 2025-05-09T15:47:34.820Z This file contains structured reference documentation, release notes, and a comprehensive directory of all documentation pages. # Documentation Directory ## Concepts - [A whistle stop tour of Lua.](https://cookbook_ao.arweave.net/concepts/lua.html) - [ao Specs](https://cookbook_ao.arweave.net/concepts/specs.html) - [aos Brief Tour](https://cookbook_ao.arweave.net/concepts/tour.html) - [Concepts](https://cookbook_ao.arweave.net/concepts/index.html) - [Eval](https://cookbook_ao.arweave.net/concepts/eval.html) - [Holographic State](https://cookbook_ao.arweave.net/concepts/holographic-state.html) - [How ao messaging works](https://cookbook_ao.arweave.net/concepts/how-it-works.html) - [Messages](https://cookbook_ao.arweave.net/concepts/messages.html) - [Processes](https://cookbook_ao.arweave.net/concepts/processes.html) - [Units](https://cookbook_ao.arweave.net/concepts/units.html) ## Guides ### Aoconnect - [aoconnect](https://cookbook_ao.arweave.net/guides/aoconnect/aoconnect.html) - [Calling DryRun](https://cookbook_ao.arweave.net/guides/aoconnect/calling-dryrun.html) - [Connecting to specific ao nodes](https://cookbook_ao.arweave.net/guides/aoconnect/connecting.html) - [DataItem Signers](https://cookbook_ao.arweave.net/guides/aoconnect/signers.html) - [Installing ao connect](https://cookbook_ao.arweave.net/guides/aoconnect/installing-connect.html) - [Monitoring Cron](https://cookbook_ao.arweave.net/guides/aoconnect/monitoring-cron.html) - [Reading results from an ao Process](https://cookbook_ao.arweave.net/guides/aoconnect/reading-results.html) - [Sending a Message to a Process](https://cookbook_ao.arweave.net/guides/aoconnect/sending-messages.html) - [Sending an Assignment to a Process](https://cookbook_ao.arweave.net/guides/aoconnect/assign-data.html) - [Spawning a Process](https://cookbook_ao.arweave.net/guides/aoconnect/spawning-processes.html) ### Aos #### Blueprints - [Blueprints](https://cookbook_ao.arweave.net/guides/aos/blueprints/index.html) - [Chatroom Blueprint](https://cookbook_ao.arweave.net/guides/aos/blueprints/chatroom.html) - [CRED Utils Blueprint](https://cookbook_ao.arweave.net/guides/aos/blueprints/cred-utils.html) - [Staking Blueprint](https://cookbook_ao.arweave.net/guides/aos/blueprints/staking.html) - [Token Blueprint](https://cookbook_ao.arweave.net/guides/aos/blueprints/token.html) - [Voting Blueprint](https://cookbook_ao.arweave.net/guides/aos/blueprints/voting.html) #### Modules - [ao](https://cookbook_ao.arweave.net/guides/aos/modules/ao.html) - [Base64](https://cookbook_ao.arweave.net/guides/aos/modules/base64.html) - [crypto](https://cookbook_ao.arweave.net/guides/aos/modules/crypto.html) - [JSON](https://cookbook_ao.arweave.net/guides/aos/modules/json.html) - [Modules](https://cookbook_ao.arweave.net/guides/aos/modules/index.html) - [Pretty](https://cookbook_ao.arweave.net/guides/aos/modules/pretty.html) - [Utils](https://cookbook_ao.arweave.net/guides/aos/modules/utils.html) - [aos: AO Operating System](https://cookbook_ao.arweave.net/guides/aos/index.html) - [Building a Token in `ao`](https://cookbook_ao.arweave.net/guides/aos/token.html) - [CLI](https://cookbook_ao.arweave.net/guides/aos/cli.html) - [Creating a Pingpong Process in aos](https://cookbook_ao.arweave.net/guides/aos/pingpong.html) - [Customizing the Prompt in aos](https://cookbook_ao.arweave.net/guides/aos/prompt.html) - [Editor setup](https://cookbook_ao.arweave.net/guides/aos/editor.html) - [FAQ](https://cookbook_ao.arweave.net/guides/aos/faq.html) - [Installing aos](https://cookbook_ao.arweave.net/guides/aos/installing.html) - [Introduction](https://cookbook_ao.arweave.net/guides/aos/intro.html) - [Load Lua Files with `.load `](https://cookbook_ao.arweave.net/guides/aos/load.html) - [Troubleshooting using ao.link](https://cookbook_ao.arweave.net/guides/aos/troubleshooting.html) - [Understanding the Inbox](https://cookbook_ao.arweave.net/guides/aos/inbox-and-handlers.html) ### Dev cli - [AO Dev-Cli 0.1](https://cookbook_ao.arweave.net/guides/dev-cli/index.html) ### Snacks #### 0rbit - [0rbit 💫](https://cookbook_ao.arweave.net/guides/snacks/0rbit/index.html) - [First GET Request](https://cookbook_ao.arweave.net/guides/snacks/0rbit/get-request.html) - [First POST Request](https://cookbook_ao.arweave.net/guides/snacks/0rbit/post-request.html) - [Getting started with SQLite](https://cookbook_ao.arweave.net/guides/snacks/sqlite.html) - [Using WeaveDrive](https://cookbook_ao.arweave.net/guides/snacks/weavedrive.html) - [Guides](https://cookbook_ao.arweave.net/guides/index.html) ## Mainnet - [AO Core Payment Relays](https://cookbook_ao.arweave.net/mainnet/ao-core-relay.html) - [AO Mainnet](https://cookbook_ao.arweave.net/mainnet/index.html) ## References ### Betteridea - [BetterIDEa](https://cookbook_ao.arweave.net/references/betteridea/index.html) - [Accessing Data from Arweave with ao](https://cookbook_ao.arweave.net/references/data.html) - [ao Module](https://cookbook_ao.arweave.net/references/ao.html) - [ao Token and Subledger Specification](https://cookbook_ao.arweave.net/references/token.html) - [Community Resources](https://cookbook_ao.arweave.net/references/community.html) - [Cron Messages](https://cookbook_ao.arweave.net/references/cron.html) - [Editor setup](https://cookbook_ao.arweave.net/references/editor-setup.html) - [Glossary](https://cookbook_ao.arweave.net/references/glossary.html) - [Handlers (Version 0.0.5)](https://cookbook_ao.arweave.net/references/handlers.html) - [Lua Optimization Guide for AO Platform](https://cookbook_ao.arweave.net/references/lua-optimization.html) - [Meet Lua](https://cookbook_ao.arweave.net/references/lua.html) - [Meet Web Assembly](https://cookbook_ao.arweave.net/references/wasm.html) - [Messaging Patterns in ao](https://cookbook_ao.arweave.net/references/messaging.html) - [References](https://cookbook_ao.arweave.net/references/index.html) ## Releasenotes - [AOS Release Notes v2.0.0](https://cookbook_ao.arweave.net/releasenotes/aos-2_0_0.html) - [AOS Release Notes v2.0.1](https://cookbook_ao.arweave.net/releasenotes/aos-2_0_1.html) - [AOS Release Notes v2.0.2](https://cookbook_ao.arweave.net/releasenotes/aos-2_0_2.html) - [Release Notes](https://cookbook_ao.arweave.net/releasenotes/index.html) ## Tutorials ### Begin - [Begin: An Interactive Tutorial](https://cookbook_ao.arweave.net/tutorials/begin/index.html) - [Building a Chatroom in aos](https://cookbook_ao.arweave.net/tutorials/begin/chatroom.html) - [Crafting a Token](https://cookbook_ao.arweave.net/tutorials/begin/token.html) - [DAO Guide](https://cookbook_ao.arweave.net/tutorials/begin/dao.html) - [Enter `The Construct` - An Interactive Tutorial](https://cookbook_ao.arweave.net/tutorials/begin/rabbithole.html) - [Messaging in `ao`](https://cookbook_ao.arweave.net/tutorials/begin/messaging.html) - [Preparations](https://cookbook_ao.arweave.net/tutorials/begin/preparations.html) - [Tokengating the Chatroom](https://cookbook_ao.arweave.net/tutorials/begin/tokengating.html) ### Bots and games - [Automated Responses](https://cookbook_ao.arweave.net/tutorials/bots-and-games/attacking.html) - [Bots and Games](https://cookbook_ao.arweave.net/tutorials/bots-and-games/index.html) - [Bringing it Together](https://cookbook_ao.arweave.net/tutorials/bots-and-games/bringing-together.html) - [Expanding the Arena](https://cookbook_ao.arweave.net/tutorials/bots-and-games/build-game.html) - [Fetching Game State](https://cookbook_ao.arweave.net/tutorials/bots-and-games/game-state.html) - [Interpreting Announcements](https://cookbook_ao.arweave.net/tutorials/bots-and-games/announcements.html) - [Let's Play A Game!](https://cookbook_ao.arweave.net/tutorials/bots-and-games/ao-effect.html) - [Mechanics of the Arena](https://cookbook_ao.arweave.net/tutorials/bots-and-games/arena-mechanics.html) - [Strategic Decisions](https://cookbook_ao.arweave.net/tutorials/bots-and-games/decisions.html) - [Tutorials](https://cookbook_ao.arweave.net/tutorials/index.html) ## Welcome ### Legacynet info - [Get involved with the ao legacynet](https://cookbook_ao.arweave.net/welcome/legacynet-info/index.html) - [Quests FAQ](https://cookbook_ao.arweave.net/welcome/legacynet-info/quests.html) - [Get started in 5 minutes](https://cookbook_ao.arweave.net/welcome/getting-started.html) - [Welcome to ao](https://cookbook_ao.arweave.net/welcome/index.html) - [https://vitepress.dev/reference/default-theme-home-page](https://cookbook_ao.arweave.net/index.html) - [LLMs Documentation](https://cookbook_ao.arweave.net/llms-explanation.html) # Detailed Content ## TABLE OF CONTENTS - API AND FUNCTION REFERENCES - ao Module - BetterIDEa - Community Resources - Cron Messages - Accessing Data from Arweave with ao - Editor setup - glossary - Handlers (Version 0.0.5) - References - Lua Optimization Guide for AO Platform - Meet Lua - Messaging Patterns in ao - ao Token and Subledger Specification - Meet Web Assembly - RELEASE NOTES AND CHANGELOGS - AOS Release Notes v2.0.0 - AOS Release Notes v2.0.1 - AOS Release Notes v2.0.2 - Release Notes ## API AND FUNCTION REFERENCES ### ao Module Source: https://cookbook_ao.arweave.net/references/ao.html ### API Definitions - Properties - Environment - Example - Methods - `ao.send - Example - `ao.spawn - Example - `ao.assign - Example - `ao.result - Example - `ao.isAssignable - Example - `ao.isAssignment - Example - `ao.addAssignable - Example - `ao.removeAssignable - Example - `ao.isTrusted - Example - Custom - Tags - Message - Spawn - Assignment - Result ### Code Examples ``` ## Methods ### `ao.send(msg: Message)` Takes a [Message](#message) as input. The function adds `ao`-specific tags and stores the message in `ao.outbox.Messages`. #### Example ``` ``` ### `ao.spawn(module: string, spawn: Spawn)` Takes a module ID string and [Spawn](#spawn) as input. Returns a Spawn table with a generated `Ref_` tag. #### Example ``` ``` ### `ao.assign(assignment: Assignment)` Takes an [Assignment](#assignment) as input. Adds the assignment to `ao.outbox.Assignments`. #### Example ``` ### Parameters | | ------------------ | ------------------------------------------------------------------------------------------------------------ | -------- | | id | Process Identifier (TxID) | string | | \_module | Module Identifier (TxID) | string | | authorities | Set of Trusted TXs | string | | Authority | Identifiers that the process is able to accept transactions from that are not the owner or the process (0-n) | string | | \_version | The version of the library | string | | reference | Reference number of the process | number | | env | Evaluation Environment | object | | outbox | Holds Messages and Spawns for response | object | | assignables | List of assignables of the process | list | | nonExtractableTags | List of non-extractable tags of the process | list | | nonForwardableTags | List of non-forwardable tags of the process | list | | init | Initializes the AO environment | function | | send | Sends a message to a target process | function | | assign | Assigns a message to the process | function | | spawn | Spawns a process | function | | result | Returns the result of a message | function | | isTrusted | Checks if a message is trusted | function | | isAssignment | Checks if a message is an assignment | function | | isAssignable | Checks if a message is assignable | function | | addAssignable | Adds an assignable to the assignables list | function | | removeAssignable | Removes an assignable from the assignables list | function | | clearOutbox | Clears the outbox | function | | normalize | Normalizes a message by extracting tags | function | | sanitize | Sanitizes a message by removing non-forwardable tags | function | | clone | Clones a table recursively | function | ### BetterIDEa Source: https://cookbook_ao.arweave.net/references/betteridea/index.html [BetterIDEa](https://ide.betteridea.dev) is a custom web based IDE for developing on ao. ### Community Resources Source: https://cookbook_ao.arweave.net/references/community.html ### API Definitions - Core - Developer - Contributing ### Cron Messages Source: https://cookbook_ao.arweave.net/references/cron.html ### API Definitions - Setting - Handling ### Accessing Data from Arweave with ao Source: https://cookbook_ao.arweave.net/references/data.html ### API Definitions - Defining - Assignment - Using - Using - Working - Using - Using - Complete - Practical - Example - Example - Important - Proper - Why ### Code Examples ``` > **Note:** When using [`.load`](../guides/aos/load.md#load-lua-files-with-load-filename), the script pauses at `Receive` until data arrives. When running commands separately in the shell, each command executes independently. ### Using Handlers For persistent processing, set up a handler: ``` ### Editor setup Source: https://cookbook_ao.arweave.net/references/editor-setup.html ### API Definitions - VS - Other - BetterIDEa ### glossary Source: https://cookbook_ao.arweave.net/references/glossary.html ### Handlers (Version 0.0.5) Source: https://cookbook_ao.arweave.net/references/handlers.html ### API Definitions - Overview - Concepts - Handler - Pattern - Basic - Common - Default - Resolvers - Module - Common - Functions - `Handlers.add - `Handlers.append - `Handlers.once - `Handlers.prepend - `Handlers.before - `Handlers.after - `Handlers.remove - Handler - Execution - Pattern - Practical - Handlers.utils - `Handlers.utils.hasMatchingData - `Handlers.utils.hasMatchingTag - `Handlers.utils.reply - Example - Pattern - Resolver - Function ### Code Examples ``` ### Default Action Handlers (AOS 2.0+) AOS 2.0 introduces simplified syntax for Action-based handlers. Instead of writing explicit pattern functions, you can use these shorthand forms: ``` ``` ### `Handlers.utils.reply(text: string)` - This helper is a simple handle function, it basically places the text value in to the `Data` property of the outbound message. ``` ### Parameters | | -------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `name` | `string` | The identifier of the handler item in the handlers list. | | `pattern` | `table` or `function` | Specifies how to match messages. As a table, defines required message tags with string values (e.g. `{ Action = "Balance", Recipient = "_" }` requires an "Action" tag with string value "Balance" and any string "Recipient" tag value). As a function, takes a message DataItem and returns: "true" (invoke handler and exit pipeline), "false" (skip handler), or "continue" (invoke handler and continue pipeline). | | `handler` | (Resolver) `table` or `function` | Either a resolver table containing pattern-function pairs for conditional execution, or a single function that processes the message. When using a resolver table, each key is a pattern matching table and its value is the function to execute when that pattern matches. When using a function, it takes the message DataItem as an argument and executes business logic. | | `maxRuns` (optional) | number | As of 0.0.5, each handler function takes an optional function to define the amount of times the handler should match before it is removed. The default is infinity. | ### References Source: https://cookbook_ao.arweave.net/references/index.html ### API Definitions - Programming - AO - Development - Community - Navigation ### Lua Optimization Guide for AO Platform Source: https://cookbook_ao.arweave.net/references/lua-optimization.html ### API Definitions - Table - Appending - Removing - Variable - Local - Upvalues - String - String - Pattern - Memory - Table - Minimize - Blockchain - State - Additional ### Meet Lua Source: https://cookbook_ao.arweave.net/references/lua.html ### API Definitions - Understanding - Setting - Basic - Hands - Resources - Best - Conclusion ### Messaging Patterns in ao Source: https://cookbook_ao.arweave.net/references/messaging.html ### API Definitions - Quick - Sending - `ao.send` - `msg.reply` - `msg.forward` - `Handlers.utils.reply` - Receiving - `Receive` - `ao.send - Message - Blocking ### Code Examples ``` Client (A) → Service (B) ↓ ↓ Continues Processes execution message ``` ``` ### `Handlers.utils.reply`: Simple Reply Handler Creation Creates a handler function that automatically replies with a fixed response. A wrapper around [`msg.reply`](#msg-reply-asynchronous-response-sending) for common use cases. **Simple String Response Example:** ``` ### ao Token and Subledger Specification Source: https://cookbook_ao.arweave.net/references/token.html ### API Definitions - Spawning - Messaging - Balance - Balances - Transfer - Get - Mint - Spawning - `Credit - Transfer - Withdraw ### Code Examples ``` ### Balances() - Returns the balance of all participants in the token. ``` ``` Recipients will infer from the `From-Process` tag of the message which tokens they have received. ### Get-Info() ``` ``` ### Mint() [optional] Implementing a `Mint` action gives the process a way of allowing valid participants to create new tokens. ``` ### Parameters | | -------- | ------------------------------------------------------------------------------------------------------ | ------------------ | | Balance | get the balance of an identifier | :heavy_check_mark: | | Balances | get a list of all ledger/account balances | :heavy_check_mark: | | Transfer | send 1 or more units from the callers balance to one or move targets with the option to notify targets | :x: | | Mint | if the ledger process is the root and you would like to increase token supply | :x: | ### Parameters | | ------------ | -------------------------------------------------------------------------------------------------------------------- | ------------------ | | Name | The title of the token, as it should be displayed to users. | :heavy_check_mark: | | Ticker | A suggested shortened name for the token, such that it can be referenced quickly. | :heavy_check_mark: | | Logo | An image that applications may desire to show next to the token, in order to make it quickly visually identifiable. | :heavy_check_mark: | | Denomination | The number of the token that should be treated as a single unit when quantities and balances are displayed to users. | :x: | ### Parameters | | ------------ | ------------------------------------------------------------------ | --------- | | Source-Token | The `ID` of the top-most process that this subledger represents. | :x: | | Parent-Token | The `ID` of the parent process that this subledger is attached to. | :x: | ### Meet Web Assembly Source: https://cookbook_ao.arweave.net/references/wasm.html WebAssembly (often abbreviated as Wasm) is a modern binary instruction format providing a portable compilation target for high-level languages like C, C++, and Rust. It enables deployment on the web for client and server applications, offering a high level of performance and efficiency. WebAssembly is designed to maintain the security and sandboxing features of web browsers, making it a suitable choice for web-based applications. It's a key technology for web developers, allowing them to write code in multiple languages and compile it into bytecode that runs in the browser at near-native speed. ## RELEASE NOTES AND CHANGELOGS ### AOS Release Notes v2.0.0 Source: https://cookbook_ao.arweave.net/releasenotes/aos-2_0_0.html Version: 2.0.0 Changes: - Receive the `await` of aos - REQ/RES semantics with References - default actions for handlers. - Authority tags are required for all processes. Messages will not be trusted by default, any Spawn MUST supply Authority tags if they plan to receive messages from MUs. The new test MU is `fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY` - Message Tag `Ref_` has been replaced for `Reference` - aos 2.0 process will always use the 'Reference' tag as a unique message counter. - No more `result.Output.data.output`, aos processes always return a consistent `Output.data` shape: - Strings as match, checking against the Action tag. - 'MessageMatchSpecs': Partially described messages. - Wildcard (`_`): Is the tag given at all? - Function: Run a function against the tag value (optional second argument is the full message) - String: Exact match - String: Lua matching syntax - Improved processid identification - https://github.com/permaweb/aos/pull/301 - update: assignable package installer - https://github.com/permaweb/aos/pull/302 ### AOS Release Notes v2.0.1 Source: https://cookbook_ao.arweave.net/releasenotes/aos-2_0_1.html Version: 2.0.1 Changes: - Bootloader - Handlers.once (defaults to prepend mode) - WeaveDrive with Attestors - WeaveDrive L2 Headers - Spawn module by name - Graphql Modules - msg.reply patch - bubble up errors during co-routine resume functions - https://github.com/permaweb/aos/pull/374 - update token.lua to check for .reply before using the replay method - staking blueprint improvement to default unstake delay block wait, and prepend finalize handler. - fixed bug with Handlers.remove - https://github.com/permaweb/aos/pull/366 ### AOS Release Notes v2.0.2 Source: https://cookbook_ao.arweave.net/releasenotes/aos-2_0_2.html Version: 2.0.2 Changes: - **Improved Spawn Process Times**: This release improves the process creation times for testnet. When you create new `aos` processes, it should now take only a few seconds to spawn. - Issue [#388](https://github.com/permaweb/aos/pull/388): fix(services/version): prevent checkForUpdate() 5xx response codes from stopping connection - Issue [#392](https://github.com/permaweb/aos/pull/392): Add Action Tag to broadcasted messages in Chatroom Blueprint - Issue [#391](https://github.com/permaweb/aos/pull/391): feat(aos): if multiple processes have the same name, allow user to select which process to run - Issue [#390](https://github.com/permaweb/aos/pull/390): fix(aos): fix error lines base cases, loading - Issue [#386](https://github.com/permaweb/aos/pull/386): fix(aos): get blueprints now uses dir - Issue [#337](https://github.com/permaweb/aos/issues/337): matchesspec does not work with from-process ### Release Notes Source: https://cookbook_ao.arweave.net/releasenotes/index.html Changes: - [AOS 2.0.2](aos-2_0_2) - Improved spawn process times and various bug fixes - [AOS 2.0.1](aos-2_0_1) - Details about patch updates and fixes in the 2.0.1 release - [AOS 2.0.0](aos-2_0_0) - Major release information, including new features and significant changes - Learn about new features that could enhance your applications - Understand potential breaking changes that might affect existing code - Discover bug fixes that resolve issues you may have encountered - Stay informed about security updates and best practices # Summary Total files processed: 18 Total documentation pages: 96 This documentation is focused on technical references and release notes, prioritizing accuracy and relevance for LLM processing.